package com.neusoft.zqygbc.neusoft_wenda.base;

import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;

/**
 * Created by Lenovo on 2017/4/16.
 */

public abstract class RetrofitCallback<T> implements Callback {

    abstract public void onResponse(T t);

    @Override
    public void onResponse(Call call, Response response) {

        onResponse((T)response.body());
    }

    @Override
    public void onFailure(Call call, Throwable t){

        System.err.println(t.getLocalizedMessage());
    }
}
